/**
 * Created with IntelliJ IDEA.
 * User: wenxiwen
 * Date: 2022/4/1
 * Time: 16:43
 * Description: No Description
 */
class OutClass {
        public int doat = 10;
        private int doat1 = 20;
        public static int doat2 = 30;

        public OutClass() {
            System.out.println("外部构造方法");
        }

        public void seat() {
            System.out.println("这是一个外部成员方法");
        }

        static class InnerClass {
            public int doat3 = 10;
            private int doat4 = 20;
            public static int doat5 = 30;

            OutClass outclass = new OutClass();
            public void set() {
                System.out.println(outclass.doat);
                System.out.println(outclass.doat1);
                System.out.println(doat2);
                System.out.println(doat3);
                System.out.println(doat4);
                System.out.println(doat5);
            }

        public InnerClass() {
            System.out.println("这是一个静态构造方法");
        }

    }
}

class Student {
    public int a = 10;

    public void seat() {
        System.out.println("这是一个匿名内部类");
    }
}

public class TestDemo {
    public static void main(String[] args) {
        new Student() {
            Student student = new Student();
            public void set() {
               seat();
            }
        }.seat();
    }
    public static void main1(String[] args) {
        OutClass.InnerClass innerclass = new OutClass.InnerClass();
        innerclass.set();
    }

}